package com.laowang.project.system.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.laowang.project.system.mapper.MyCyhActivityCodeMapper;
import com.laowang.project.system.domain.MyCyhActivityCode;
import com.laowang.project.system.service.MyCyhActivityCodeService;

/**
 * 活动邀请码Service业务层处理
 *
 * @author laowang
 * @date 2023-07-03
 */
@Service
public class MyCyhActivityCodeServiceImpl implements MyCyhActivityCodeService {
    @Autowired
    private MyCyhActivityCodeMapper myCyhActivityCodeMapper;

    /**
     * 查询活动邀请码
     *
     * @param id 活动邀请码ID
     * @return 活动邀请码
     */
    @Override
    public MyCyhActivityCode selectMyCyhActivityCodeById(Integer id) {
        return myCyhActivityCodeMapper.selectMyCyhActivityCodeById(id);
    }

    /**
     * 查询活动邀请码列表
     *
     * @param myCyhActivityCode 活动邀请码
     * @return 活动邀请码
     */
    @Override
    public List<MyCyhActivityCode> selectMyCyhActivityCodeList(MyCyhActivityCode myCyhActivityCode) {
        return myCyhActivityCodeMapper.selectMyCyhActivityCodeList(myCyhActivityCode);
    }

    /**
     * 新增活动邀请码
     *
     * @param myCyhActivityCode 活动邀请码
     * @return 结果
     */
    @Override
    public int insertMyCyhActivityCode(MyCyhActivityCode myCyhActivityCode) {
        return myCyhActivityCodeMapper.insertMyCyhActivityCode(myCyhActivityCode);
    }

    /**
     * 修改活动邀请码
     *
     * @param myCyhActivityCode 活动邀请码
     * @return 结果
     */
    @Override
    public int updateMyCyhActivityCode(MyCyhActivityCode myCyhActivityCode) {
        return myCyhActivityCodeMapper.updateMyCyhActivityCode(myCyhActivityCode);
    }

    /**
     * 批量删除活动邀请码
     *
     * @param ids 需要删除的活动邀请码ID
     * @return 结果
     */
    @Override
    public int deleteMyCyhActivityCodeByIds(Integer[] ids) {
        return myCyhActivityCodeMapper.deleteMyCyhActivityCodeByIds(ids);
    }

    /**
     * 删除活动邀请码信息
     *
     * @param id 活动邀请码ID
     * @return 结果
     */
    @Override
    public int deleteMyCyhActivityCodeById(Integer id) {
        return myCyhActivityCodeMapper.deleteMyCyhActivityCodeById(id);
    }

    @Override
    public List<MyCyhActivityCode> selectMyCyhActivityCodeByActivityId(MyCyhActivityCode myCyhActivityCode) {
        return myCyhActivityCodeMapper.selectMyCyhActivityCodeByActivityId(myCyhActivityCode);
    }
}
